package org.example.service;

import org.example.controller.request.ConfirmOrderRequest;
import org.example.controller.request.ProductOrderPageRequest;
import org.example.model.EventMessage;
import org.example.util.JsonData;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 谢超
 * @since 2024-03-22
 */
public interface ProductOrderService {

    Map<String, Object> page(ProductOrderPageRequest pageRequest);

    String queryProductOrderState(String outTradeNo);

    JsonData confirmOrder(ConfirmOrderRequest orderRequest);

    boolean closeProductOrder(EventMessage eventMessage);

    JsonData processOrderCallBackMsg(String name, Map<String, String> paramsMap);

    /**
     * 处理订单队列消费消息
     * @param eventMessage
     */
    void handleProductOrderMessage(EventMessage eventMessage);
}

